{include common/head}
<div class="container-scroller">
    {include common/header}
    <!-- partial -->
    <div class="container-fluid page-body-wrapper">
        {include common/sidebar}
      <!-- partial -->
      <div class="main-panel">
        <div class="content-wrapper">
          <div class="row">
            <div class="col-lg-12 grid-margin">
              <div class="card">
                <div class="card-body">
                  <h4 class="card-title">已授权网站</h4>
                  <div class="table-responsive">
                    <table class="table table-bordered">
                      <thead>
                        <tr>
                          <th>
                            #
                          </th>
                          <th>
                            网站
                          </th>
                          <th>
                            目录
                          </th>
                          <th>
                            时间
                          </th>
                          <th>
                            操作
                          </th>
                        </tr>
                      </thead>
                      <tbody>
                        {foreach $data as $v}
                        <tr>
                          <td class="font-weight-medium">
                            {$v.id}
                          </td>
                          <td class="text-primary">
                            <a target="_blank" href="http://{$v.domain}">{$v.domain}</a>
                          </td>
                          <td>
                            {$v.path}
                          </td>
                          <td>
                            {php echo date('Y-m-d H:i:s',$v['atime'])}
                          </td>
                          <td style="width:60px;"> 
                            <button type="button" class="btn btn-danger"  data-toggle="modal" data-target="#shanchu_daoban" data-whatever="{$v.id}">
                                <i class="mdi mdi-alert-outline"></i>删除
                            </button>
                          </td>
                        </tr>
                        {/foreach}
                      </tbody>
                    </table>
                    <div class=" ">
                        <div class="text-center mt-4">
                            <a href="{if $pageid==1}javascript:void(0);{else}{php echo DN_URL('admin','daoban_list');}?page={$pageid-1}{/if}"  class="btn btn-primary {if $pageid==1}disabled{/if}" ><i class="fa fa-arrow-left"></i> 上一页</a>
                            <a href="{if $pageid==$page_count}javascript:void(0);{else}{php echo DN_URL('admin','daoban_list');}?page={$pageid+1}{/if}" class="btn btn-primary {if $pageid==$page_count}disabled{/if}" >下一页 <i class="fa fa-arrow-right"></i></a>
                        </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
            <!-- 删除 -->
            <div class="modal fade" id="shanchu_daoban" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel-bianji" aria-hidden="true">
                  <div class="modal-dialog" role="document">
                      <div class="modal-content">
                      <div class="modal-header">
                          <h5 class="modal-title" id="exampleModalLabel-bianji">警告</h5>
                          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                          <span aria-hidden="true">&times;</span>
                          </button>
                      </div>
                      <div class="modal-body">
                          <div class="d-flex justify-content-center align-items-center text-danger">
                              <i class="fa fa-warning mr-3" style="font-size:3rem"></i> 这个删除只是删除的后台盗版记录。
                          </div>
                          <input type="hidden" name="id">
                      </div>
                      <div class="modal-footer">
                          <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                          <button type="button" class="btn btn-danger" onclick="del_daoban()">删除</button>
                      </div>
                      </div>
                  </div>
              </div>
        </div>
        <!-- content-wrapper ends -->
        <!-- partial:partials/_footer.html -->
        {include common/footer}
        <!-- partial -->
      </div>
      <!-- main-panel ends -->
    </div>
    <!-- page-body-wrapper ends -->
  </div>
  <!-- container-scroller -->
{include common/foot}